Skip to content

Update getQuery QueryObjectModelInterface method#225

Merged
dbu merged 2 commits intophpcr:2.xfrom
alexander-schranz:patch-1
Apr 8, 2024
Merged

Update getQuery QueryObjectModelInterface method#225
dbu merged 2 commits intophpcr:2.xfrom
alexander-schranz:patch-1

Conversation

@alexander-schranz
Copy link
Contributor

I think there is not any case where getQuery can be null in this method.

Copy link
Member

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at this code, i don't see how this could ever be nullable.

but this is not the right fix - we should remote the ? of getQuery.

very strictly speaking, this is a BC break if somebody overwrote that specific method, but i don't expect people to do that.

changing it in the annotation only is cheating on phpstan and could hide the problem rather than make people notice because of the conflict.

@alexander-schranz
Copy link
Contributor Author

@dbu changed the native return type.

@dbu dbu merged commit 705baa5 into phpcr:2.x Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants